<template>

home
<el-button type="primary" size="small" @click="add">Primary</el-button>
{{ count.count1 }}
<hr>
{{ count.count }}

</template>

<script setup >
import axios from 'axios'
import { onBeforeMount, onMounted } from 'vue';
import {useCounterStore} from '@/stores/counter'
const count = useCounterStore()
onBeforeMount(()=>{
    axios.get('/api').then(res=>{
        console.log(res.data);
    })
})
const add = ()=>{
    count.increment()
}
</script>

<style>

</style>
